const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [{
  path: '/dealerSale',
  meta: {
    title: '销售管理',
    icon: 'el-icon-s-operation'
  },
  redirect: '/dealerSale/DealerDaily',
  component: RouteView,
  children: [{
      path: '/dealerSale/TestDrive',
      meta: {
        title: '试乘试驾管理'
      },
      component: RouteView,
      children: [{
          path: '/dealerSale/TestDrive/apply',
          meta: {
            title: '试乘试驾车申请',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/apply')
        },

        {
          path: '/dealerSale/TestDrive/query',
          meta: {
            title: '试乘试驾车查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/query')
        },
        {
          path: '/dealerSale/TestDrive/rebateExchangeApply',
          meta: {
            title: '试乘试驾车返利兑换申请维护',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/rebateExchangeApply')
        },
        {
          path: '/dealerSale/TestDrive/rebateExchangeQuery',
          meta: {
            title: '试乘试驾车返利兑换查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/rebateExchangeQuery')
        },
        {
          path: '/dealerSale/TestDrive/routineApply',
          meta: {
            title: '试乘试驾车转常规申请',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/routineApply')
        },
        {
          path: '/dealerSale/TestDrive/routineQuery',
          meta: {
            title: '试驾车转常规车查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/routineQuery')
        },
        {
          path: '/dealerSale/TestDrive/VehicleInspectionApply',
          meta: {
            title: '试乘试驾车检核信息提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TestDrive/VehicleInspectionApply')
        },
      ]
    },
    {
      path: '/dealerSale/DealerDaily',
      meta: {
        title: '日报管理'
      },
      component: RouteView,
      children: [{
          path: '/dealerSale/DealerDaily/Dealermaintain',
          meta: {
            title: '日报维护',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/DealerDaily/Dealermaintain')
        },
        {
          path: '/dealerSale/DealerDaily/Dealerquiry',
          meta: {
            title: '日报查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/DealerDaily/Dealerquiry')
        },
        {
          path: '/dealerSale/DealerDaily/Modelquiry',
          meta: {
            title: '日报查询车型',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/DealerDaily/Modelquiry')
        },
      ]
    },
    {
      path: '/dealerSale/vehicleParameters',
      meta: {
        title: '整车基础参数管理'
      },
      redirect: '/dealerSale/vehicleParameters',
      component: RouteView,
      children: [{
          path: '/dealerSale/vehicleParameters/materialPrice',
          meta: {
            title: '整车物料基础参数管理',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/vehicleParameters/materialPrice')
        },

      ]
    },
    {
      path: '/dealerSale/salesPlan',
      meta: {
        title: '销售计划管理'
      },
      redirect: '/dealerSale/salesPlan',
      component: RouteView,
      children: [{
          path: '/dealerSale/salesPlan/PlanReportN1',
          meta: {
            title: '需求计划提报(N+1)',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/PlanReportN1')
        },
        {
          path: '/dealerSale/salesPlan/PlanReportN2',
          meta: {
            title: '需求计划提报(N+2&N+3)',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/PlanReportN2')
        },
        {
          path: '/dealerSale/salesPlan/RequirementCompletion',
          meta: {
            title: '需求及完成情况分析',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/RequirementCompletion')
        },
        {
          path: '/dealerSale/salesPlan/GoalAccomplished',
          meta: {
            title: '目标及完成情况分析',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/GoalAccomplished')
        },
        {
          path: '/dealerSale/salesPlan/MonthlyTargetConfirmation',
          meta: {
            title: '月度目标确认',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/MonthlyTargetConfirmation')
        },
        {
          path: '/dealerSale/salesPlan/MonthlyTargetQuery',
          meta: {
            title: '月度目标查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/MonthlyTargetQuery')
        },
        {
          path: '/dealerSale/salesPlan/MonthTargetQuery',
          meta: {
            title: 'C端月度目标查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/MonthTargetQuery')
        },
        {
          path: '/dealerSale/salesPlan/MonthTargetQuerySideB',
          meta: {
            title: 'B端月度指标查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/MonthTargetQuerySideB')
        },
        {
          path: '/dealerSale/salesPlan/MonthPlanReport',
          meta: {
            title: 'C端月度计划提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/MonthPlanReport')
        },
        {
          path: '/dealerSale/salesPlan/PlanReportSideB',
          meta: {
            title: 'B端计划提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/salesPlan/PlanReportSideB')
        },
      ]
    },
    {
      path: '/dealerSale/KeyCustomers',
      meta: {
        title: '大客户订单管理'
      },
      redirect: '/dealerSale/KeyCustomers',
      component: RouteView,
      children: [{
          path: '/dealerSale/KeyCustomers/ContractFiling',
          meta: {
            title: '合同备案登记',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/KeyCustomers/ContractFiling')
        },
        {
          path: '/dealerSale/KeyCustomers/OrderSubmission',
          meta: {
            title: '大客户订单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/KeyCustomers/OrderSubmission')
        },
        {
          path: '/dealerSale/KeyCustomers/OrderInquiry',
          meta: {
            title: '大客户订单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/KeyCustomers/OrderInquiry')
        },
      ]
    },
    {

      path: '/dealerSale/OrderManagement',
      meta: {
        title: '订单管理'
      },
      redirect: '/dealerSale/OrderManagement',
      component: RouteView,
      children: [{
          path: '/dealerSale/OrderManagement/PickAddress',
          meta: {
            title: '收车地址查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/PickAddress')
        },
        {
          path: '/dealerSale/OrderManagement/OrderSubmission',
          meta: {
            title: '订货单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderSubmission')
        },
        {
          path: '/dealerSale/OrderManagement/OrderFormQuery',
          meta: {
            title: '订货单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderFormQuery')
        },
        {
          path: '/dealerSale/OrderManagement/OrderDetailQuery',
          meta: {
            title: '订单明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderDetailQuery')
        },
        {
          path: '/dealerSale/OrderManagement/OrderDetailQueryC',
          meta: {
            title: 'C端订单明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderDetailQueryC')
        },
        {
          path: '/dealerSale/OrderManagement/afOrderSubmission',
          meta: {
            title: '调货单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/afOrderSubmission')
        },
        {
          path: '/dealerSale/OrderManagement/afSignWarehousing',
          meta: {
            title: '调货单车辆签收',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/afSignWarehousing')
        },
        {
          path: '/dealerSale/OrderManagement/OrderSubmissionC',
          meta: {
            title: 'C端增补订单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderSubmissionC')
        },
        {
          path: '/dealerSale/OrderManagement/OrderQueryC',
          meta: {
            title: 'C端订单查看',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderQueryC')
        },
        {
          path: '/dealerSale/OrderManagement/OrderSubmissionSideB',
          meta: {
            title: 'B端订单提报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderSubmissionSideB')
        },
        {
          path: '/dealerSale/OrderManagement/OrderSideBQuery',
          meta: {
            title: 'B端订单查看',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderSideBQuery')
        },
        {
          path: '/dealerSale/OrderManagement/WaybillQueryC',
          meta: {
            title: '货运单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/WaybillQueryC')
        },
        {
          path: '/dealerSale/OrderManagement/OrderDetailQueryB',
          meta: {
            title: 'B端订单明细查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/OrderManagement/OrderDetailQueryB')
        },
      ]
    },
    {
      path: '/dealerSale/InventoryManagement',
      meta: {
        title: '店端库存管理'
      },
      redirect: '/dealerSale/InventoryManagement',
      component: RouteView,
      children: [{
          path: '/dealerSale/InventoryManagement/WarehouseMaintenance',
          meta: {
            title: '仓库维护',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/InventoryManagement/WarehouseMaintenance')
        },
        {
          path: '/dealerSale/InventoryManagement/SignWarehousing',
          meta: {
            title: '签收入库',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/InventoryManagement/SignWarehousing')
        },
        {
          path: '/dealerSale/InventoryManagement/InventoryQuery',
          meta: {
            title: '经销商库存查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/InventoryManagement/InventoryQuery')
        },
        {
          path: '/dealerSale/InventoryManagement/InventoryManagement',
          meta: {
            title: '库存管理',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/InventoryManagement/InventoryManagement')
        },
        {
          path: '/dealerSale/InventoryManagement/MoveStorehouse',
          meta: {
            title: '车辆移库',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/InventoryManagement/MoveStorehouse')
        },
      ]
    },
    {
      path: '/dealerSale/TransferManager',
      meta: {
        title: '调拨管理'
      },
      redirect: '/dealerSale/TransferManager',
      component: RouteView,
      children: [{
          path: '/dealerSale/TransferManager/Transferred',
          meta: {
            title: '调拨申请',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TransferManager/Transferred')
        },
        {
          path: '/dealerSale/TransferManager/TransferStock',
          meta: {
            title: '调拨入库',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TransferManager/TransferStock')
        },
        {
          path: '/dealerSale/TransferManager/TransferQuery',
          meta: {
            title: '调拨查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/TransferManager/TransferQuery')
        },
      ]
    },
    {
      path: '/dealerSale/PurchaseReturn',
      meta: {
        title: '采购退货管理'
      },
      redirect: '/dealerSale/PurchaseReturn',
      component: RouteView,
      children: [{
        path: '/dealerSale/PurchaseReturn/PurchaseReturn',
        meta: {
          title: '采购员退货查询',
          keepAlive: true
        },
        component: AsyncComponent('dealerSale/PurchaseReturn/PurchaseReturn')
      }, ]
    },
    {
      path: '/dealerSale/SalesSanagement',
      meta: {
        title: '实销管理'
      },
      redirect: '/dealerSale/SalesSanagement',
      component: RouteView,
      children: [{
          path: '/dealerSale/SalesSanagement/RetailOrderMaintenance',
          meta: {
            title: '零售单维护',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderMaintenance')
        },
        {
          path: '/dealerSale/SalesSanagement/RetailOrderMaintenanceAF',
          meta: {
            title: '零售单维护（ARCFOX）',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderMaintenanceAF')
        },
        {
          path: '/dealerSale/SalesSanagement/RetailOrderReview',
          meta: {
            title: '零售单审核',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderReview')
        },
        {
          path: '/dealerSale/SalesSanagement/RetailOrderReviewAF',
          meta: {
            title: '零售单审核（ARCFOX）',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderReviewAF')
        },
        {
          path: '/dealerSale/SalesSanagement/RetailOrderQuery',
          meta: {
            title: '零售单查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderQuery')
        },
        {
          path: '/dealerSale/SalesSanagement/RetailOrderQueryAF',
          meta: {
            title: '零售单查询（ARCFOX）',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/RetailOrderQueryAF')
        },
        {
          path: '/dealerSale/SalesSanagement/ActualSalesReport',
          meta: {
            title: '实销上报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/ActualSalesReport')
        },
        {
          path: '/dealerSale/SalesSanagement/ActualSalesQuery',
          meta: {
            title: '实销信息查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/ActualSalesQuery')
        },
        {
          path: '/dealerSale/SalesSanagement/ActualSalesChange',
          meta: {
            title: '实销变更申请',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/ActualSalesChange')
        },
        {
          path: '/dealerSale/SalesSanagement/SalesChangeQuery',
          meta: {
            title: '实销变更查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesSanagement/SalesChangeQuery')
        },
      ]
    },
    {
      path: '/dealerSale/SalesReturn',
      meta: {
        title: '实销退货管理'
      },
      redirect: '/dealerSale/SalesReturn',
      component: RouteView,
      children: [

        {
          path: '/dealerSale/SalesReturn/ReturnQuery',
          meta: {
            title: '销售退车查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesReturn/ReturnQuery')
        },
        {
          path: '/dealerSale/SalesReturn/ReturnVehicle',
          meta: {
            title: '退车入库',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/SalesReturn/ReturnVehicle')
        },
      ]
    },
    {
      path: '/dealerSale/Registration',
      meta: {
        title: '上牌管理'
      },
      redirect: '/dealerSale/Registration',
      component: RouteView,
      children: [{
          path: '/dealerSale/Registration/RegistrationUpload',
          meta: {
            title: '上牌信息上传',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/Registration/RegistrationUpload')
        },
        {
          path: '/dealerSale/Registration/RegistrationInquiry',
          meta: {
            title: '上牌信息查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/Registration/RegistrationInquiry')
        },
      ]
    },
    {
      path: '/dealerSale/subsidy',
      meta: {
        title: '补贴管理'
      },
      redirect: '/dealerSale/subsidy',
      component: RouteView,
      children: [{
          path: '/dealerSale/subsidy/subsidyUpload',
          meta: {
            title: '补贴信息上报',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/subsidy/subsidyUpload')
        },
        {
          path: '/dealerSale/subsidy/subsidyInquiry',
          meta: {
            title: '补贴信息查询',
            keepAlive: true
          },
          component: AsyncComponent('dealerSale/subsidy/subsidyInquiry')
        },
      ]
    },
    {
      path: '/dealerSale/certificate',
      meta: {
        title: '合格证管理'
      },
      redirect: '/dealerSale/certificate',
      component: RouteView,
      children: [{
        path: '/dealerSale/certificate/MailInquiry',
        meta: {
          title: '合格证邮寄查询',
          keepAlive: true
        },
        component: AsyncComponent('dealerSale/certificate/MailInquiry')
      }, ]
    },

  ]
}];
export default menuRoutes;
